package com.liuwei.temp_show.Controller;

import com.liuwei.temp_show.Entity.TempMsg;
import com.liuwei.temp_show.Service.TempService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/api/temperature")
public class TempController {

    @Autowired
    private TempService tempService;

    @GetMapping("/all")
    public List<TempMsg> getAllTemperatures() {
        return tempService.getAllTemperatures();
    }
}